package com.itheima.bos.service;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.itheima.bos.domain.page.PageBean;
import com.itheima.bos.domain.take_delivery.Promotion;

public interface PromotionService {

	void save(Promotion promotion);

	Page<Promotion> findAll(Pageable pageable);

	@GET
	@Path("/pageQuery")
	@Consumes({ "application/xml" , "application/json" })
	@Produces({ "application/xml" , "application/json" })
	public PageBean<Promotion> page_Query(@QueryParam("page")int page,@QueryParam("rows")int rows);
	
	@GET
	@Path("/findById")
	@Consumes({ "application/xml" , "application/json" })
	@Produces({ "application/xml" , "application/json" })
	public Promotion findById(@QueryParam("id")int id);

	void updateStatus();
}
